﻿using System;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Data.EntityClient;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.Serialization;

namespace Wicresoft.RDW.Model
{
    #region Entities

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Announcement")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Announcement : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Announcement object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="language">Initial value of the Language property.</param>
        /// <param name="subject">Initial value of the Subject property.</param>
        /// <param name="body">Initial value of the Body property.</param>
        /// <param name="createTime">Initial value of the CreateTime property.</param>
        /// <param name="createBy">Initial value of the CreateBy property.</param>
        public static Announcement CreateAnnouncement(global::System.Int32 id, global::System.String language, global::System.String subject, global::System.String body, global::System.DateTime createTime, global::System.Int32 createBy)
        {
            Announcement announcement = new Announcement();
            announcement.Id = id;
            announcement.Language = language;
            announcement.Subject = subject;
            announcement.Body = body;
            announcement.CreateTime = createTime;
            announcement.CreateBy = createBy;
            return announcement;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Language
        {
            get
            {
                return _Language;
            }
            set
            {
                OnLanguageChanging(value);
                ReportPropertyChanging("Language");
                _Language = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Language");
                OnLanguageChanged();
            }
        }
        private global::System.String _Language;
        partial void OnLanguageChanging(global::System.String value);
        partial void OnLanguageChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Subject
        {
            get
            {
                return _Subject;
            }
            set
            {
                OnSubjectChanging(value);
                ReportPropertyChanging("Subject");
                _Subject = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Subject");
                OnSubjectChanged();
            }
        }
        private global::System.String _Subject;
        partial void OnSubjectChanging(global::System.String value);
        partial void OnSubjectChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Body
        {
            get
            {
                return _Body;
            }
            set
            {
                OnBodyChanging(value);
                ReportPropertyChanging("Body");
                _Body = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Body");
                OnBodyChanged();
            }
        }
        private global::System.String _Body;
        partial void OnBodyChanging(global::System.String value);
        partial void OnBodyChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.DateTime CreateTime
        {
            get
            {
                return _CreateTime;
            }
            set
            {
                OnCreateTimeChanging(value);
                ReportPropertyChanging("CreateTime");
                _CreateTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreateTime");
                OnCreateTimeChanged();
            }
        }
        private global::System.DateTime _CreateTime;
        partial void OnCreateTimeChanging(global::System.DateTime value);
        partial void OnCreateTimeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 CreateBy
        {
            get
            {
                return _CreateBy;
            }
            set
            {
                OnCreateByChanging(value);
                ReportPropertyChanging("CreateBy");
                _CreateBy = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreateBy");
                OnCreateByChanged();
            }
        }
        private global::System.Int32 _CreateBy;
        partial void OnCreateByChanging(global::System.Int32 value);
        partial void OnCreateByChanged();

        #endregion

    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Answer")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Answer : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Answer object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="questionId">Initial value of the QuestionId property.</param>
        public static Answer CreateAnswer(global::System.Int32 id, global::System.Int32 questionId)
        {
            Answer answer = new Answer();
            answer.Id = id;
            answer.QuestionId = questionId;
            return answer;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 QuestionId
        {
            get
            {
                return _QuestionId;
            }
            set
            {
                OnQuestionIdChanging(value);
                ReportPropertyChanging("QuestionId");
                _QuestionId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("QuestionId");
                OnQuestionIdChanged();
            }
        }
        private global::System.Int32 _QuestionId;
        partial void OnQuestionIdChanging(global::System.Int32 value);
        partial void OnQuestionIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Answer_CN
        {
            get
            {
                return _Answer_CN;
            }
            set
            {
                OnAnswer_CNChanging(value);
                ReportPropertyChanging("Answer_CN");
                _Answer_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Answer_CN");
                OnAnswer_CNChanged();
            }
        }
        private global::System.String _Answer_CN;
        partial void OnAnswer_CNChanging(global::System.String value);
        partial void OnAnswer_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Answer_EN
        {
            get
            {
                return _Answer_EN;
            }
            set
            {
                OnAnswer_ENChanging(value);
                ReportPropertyChanging("Answer_EN");
                _Answer_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Answer_EN");
                OnAnswer_ENChanged();
            }
        }
        private global::System.String _Answer_EN;
        partial void OnAnswer_ENChanging(global::System.String value);
        partial void OnAnswer_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String ControlType
        {
            get
            {
                return _ControlType;
            }
            set
            {
                OnControlTypeChanging(value);
                ReportPropertyChanging("ControlType");
                _ControlType = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ControlType");
                OnControlTypeChanged();
            }
        }
        private global::System.String _ControlType;
        partial void OnControlTypeChanging(global::System.String value);
        partial void OnControlTypeChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Question_Answer_FK1", "Question")]
        public Question Question
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Question>("RDWModel.Question_Answer_FK1", "Question").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Question>("RDWModel.Question_Answer_FK1", "Question").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Question> QuestionReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Question>("RDWModel.Question_Answer_FK1", "Question");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Question>("RDWModel.Question_Answer_FK1", "Question", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Department")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Department : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Department object.
        /// </summary>
        /// <param name="depId">Initial value of the DepId property.</param>
        /// <param name="creditScore">Initial value of the CreditScore property.</param>
        public static Department CreateDepartment(global::System.Int32 depId, global::System.Int32 creditScore)
        {
            Department department = new Department();
            department.DepId = depId;
            department.CreditScore = creditScore;
            return department;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 DepId
        {
            get
            {
                return _DepId;
            }
            set
            {
                if (_DepId != value)
                {
                    OnDepIdChanging(value);
                    ReportPropertyChanging("DepId");
                    _DepId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("DepId");
                    OnDepIdChanged();
                }
            }
        }
        private global::System.Int32 _DepId;
        partial void OnDepIdChanging(global::System.Int32 value);
        partial void OnDepIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Name_CN
        {
            get
            {
                return _Name_CN;
            }
            set
            {
                OnName_CNChanging(value);
                ReportPropertyChanging("Name_CN");
                _Name_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Name_CN");
                OnName_CNChanged();
            }
        }
        private global::System.String _Name_CN;
        partial void OnName_CNChanging(global::System.String value);
        partial void OnName_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Name_EN
        {
            get
            {
                return _Name_EN;
            }
            set
            {
                OnName_ENChanging(value);
                ReportPropertyChanging("Name_EN");
                _Name_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Name_EN");
                OnName_ENChanged();
            }
        }
        private global::System.String _Name_EN;
        partial void OnName_ENChanging(global::System.String value);
        partial void OnName_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Platform
        {
            get
            {
                return _Platform;
            }
            set
            {
                OnPlatformChanging(value);
                ReportPropertyChanging("Platform");
                _Platform = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Platform");
                OnPlatformChanged();
            }
        }
        private global::System.String _Platform;
        partial void OnPlatformChanging(global::System.String value);
        partial void OnPlatformChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Code
        {
            get
            {
                return _Code;
            }
            set
            {
                OnCodeChanging(value);
                ReportPropertyChanging("Code");
                _Code = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Code");
                OnCodeChanged();
            }
        }
        private global::System.String _Code;
        partial void OnCodeChanging(global::System.String value);
        partial void OnCodeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 CreditScore
        {
            get
            {
                return _CreditScore;
            }
            set
            {
                OnCreditScoreChanging(value);
                ReportPropertyChanging("CreditScore");
                _CreditScore = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreditScore");
                OnCreditScoreChanged();
            }
        }
        private global::System.Int32 _CreditScore;
        partial void OnCreditScoreChanging(global::System.Int32 value);
        partial void OnCreditScoreChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Department_User_FK1", "User")]
        public EntityCollection<User> User
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<User>("RDWModel.Department_User_FK1", "User");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<User>("RDWModel.Department_User_FK1", "User", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Feedback")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Feedback : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Feedback object.
        /// </summary>
        /// <param name="feedbackId">Initial value of the FeedbackId property.</param>
        /// <param name="requestId">Initial value of the RequestId property.</param>
        /// <param name="status">Initial value of the Status property.</param>
        /// <param name="isPublished">Initial value of the IsPublished property.</param>
        public static Feedback CreateFeedback(global::System.Int32 feedbackId, global::System.Int32 requestId, global::System.Int32 status, global::System.Boolean isPublished)
        {
            Feedback feedback = new Feedback();
            feedback.FeedbackId = feedbackId;
            feedback.RequestId = requestId;
            feedback.Status = status;
            feedback.IsPublished = isPublished;
            return feedback;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 FeedbackId
        {
            get
            {
                return _FeedbackId;
            }
            set
            {
                if (_FeedbackId != value)
                {
                    OnFeedbackIdChanging(value);
                    ReportPropertyChanging("FeedbackId");
                    _FeedbackId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("FeedbackId");
                    OnFeedbackIdChanged();
                }
            }
        }
        private global::System.Int32 _FeedbackId;
        partial void OnFeedbackIdChanging(global::System.Int32 value);
        partial void OnFeedbackIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 RequestId
        {
            get
            {
                return _RequestId;
            }
            set
            {
                OnRequestIdChanging(value);
                ReportPropertyChanging("RequestId");
                _RequestId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RequestId");
                OnRequestIdChanged();
            }
        }
        private global::System.Int32 _RequestId;
        partial void OnRequestIdChanging(global::System.Int32 value);
        partial void OnRequestIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Status
        {
            get
            {
                return _Status;
            }
            set
            {
                OnStatusChanging(value);
                ReportPropertyChanging("Status");
                _Status = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Status");
                OnStatusChanged();
            }
        }
        private global::System.Int32 _Status;
        partial void OnStatusChanging(global::System.Int32 value);
        partial void OnStatusChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Boolean IsPublished
        {
            get
            {
                return _IsPublished;
            }
            set
            {
                OnIsPublishedChanging(value);
                ReportPropertyChanging("IsPublished");
                _IsPublished = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsPublished");
                OnIsPublishedChanged();
            }
        }
        private global::System.Boolean _IsPublished;
        partial void OnIsPublishedChanging(global::System.Boolean value);
        partial void OnIsPublishedChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Feedback_FeedbackAnswer_FK1", "FeedbackAnswer")]
        public EntityCollection<FeedbackAnswer> FeedbackAnswer
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<FeedbackAnswer>("RDWModel.Feedback_FeedbackAnswer_FK1", "FeedbackAnswer");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<FeedbackAnswer>("RDWModel.Feedback_FeedbackAnswer_FK1", "FeedbackAnswer", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Request_Feedback_FK1", "Request")]
        public Request Request
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_Feedback_FK1", "Request").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_Feedback_FK1", "Request").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Request> RequestReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_Feedback_FK1", "Request");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Request>("RDWModel.Request_Feedback_FK1", "Request", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "FeedbackAnswer")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class FeedbackAnswer : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new FeedbackAnswer object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        public static FeedbackAnswer CreateFeedbackAnswer(global::System.Int32 id)
        {
            FeedbackAnswer feedbackAnswer = new FeedbackAnswer();
            feedbackAnswer.Id = id;
            return feedbackAnswer;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> QuestionId
        {
            get
            {
                return _QuestionId;
            }
            set
            {
                OnQuestionIdChanging(value);
                ReportPropertyChanging("QuestionId");
                _QuestionId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("QuestionId");
                OnQuestionIdChanged();
            }
        }
        private Nullable<global::System.Int32> _QuestionId;
        partial void OnQuestionIdChanging(Nullable<global::System.Int32> value);
        partial void OnQuestionIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> AnswerId
        {
            get
            {
                return _AnswerId;
            }
            set
            {
                OnAnswerIdChanging(value);
                ReportPropertyChanging("AnswerId");
                _AnswerId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("AnswerId");
                OnAnswerIdChanged();
            }
        }
        private Nullable<global::System.Int32> _AnswerId;
        partial void OnAnswerIdChanging(Nullable<global::System.Int32> value);
        partial void OnAnswerIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> FeedbackId
        {
            get
            {
                return _FeedbackId;
            }
            set
            {
                OnFeedbackIdChanging(value);
                ReportPropertyChanging("FeedbackId");
                _FeedbackId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("FeedbackId");
                OnFeedbackIdChanged();
            }
        }
        private Nullable<global::System.Int32> _FeedbackId;
        partial void OnFeedbackIdChanging(Nullable<global::System.Int32> value);
        partial void OnFeedbackIdChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Feedback_FeedbackAnswer_FK1", "Feedback")]
        public Feedback Feedback
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Feedback>("RDWModel.Feedback_FeedbackAnswer_FK1", "Feedback").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Feedback>("RDWModel.Feedback_FeedbackAnswer_FK1", "Feedback").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Feedback> FeedbackReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Feedback>("RDWModel.Feedback_FeedbackAnswer_FK1", "Feedback");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Feedback>("RDWModel.Feedback_FeedbackAnswer_FK1", "Feedback", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Lab")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Lab : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Lab object.
        /// </summary>
        /// <param name="labId">Initial value of the LabId property.</param>
        /// <param name="locationId">Initial value of the LocationId property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        public static Lab CreateLab(global::System.Int32 labId, global::System.Int32 locationId, global::System.String name)
        {
            Lab lab = new Lab();
            lab.LabId = labId;
            lab.LocationId = locationId;
            lab.Name = name;
            return lab;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 LabId
        {
            get
            {
                return _LabId;
            }
            set
            {
                if (_LabId != value)
                {
                    OnLabIdChanging(value);
                    ReportPropertyChanging("LabId");
                    _LabId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("LabId");
                    OnLabIdChanged();
                }
            }
        }
        private global::System.Int32 _LabId;
        partial void OnLabIdChanging(global::System.Int32 value);
        partial void OnLabIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 LocationId
        {
            get
            {
                return _LocationId;
            }
            set
            {
                OnLocationIdChanging(value);
                ReportPropertyChanging("LocationId");
                _LocationId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LocationId");
                OnLocationIdChanged();
            }
        }
        private global::System.Int32 _LocationId;
        partial void OnLocationIdChanging(global::System.Int32 value);
        partial void OnLocationIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Desc
        {
            get
            {
                return _Desc;
            }
            set
            {
                OnDescChanging(value);
                ReportPropertyChanging("Desc");
                _Desc = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Desc");
                OnDescChanged();
            }
        }
        private global::System.String _Desc;
        partial void OnDescChanging(global::System.String value);
        partial void OnDescChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Lab_LabManager_FK1", "LabManager")]
        public EntityCollection<LabManager> LabManager
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<LabManager>("RDWModel.Lab_LabManager_FK1", "LabManager");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<LabManager>("RDWModel.Lab_LabManager_FK1", "LabManager", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Lab_Product_FK1", "Product")]
        public EntityCollection<Product> Product
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Product>("RDWModel.Lab_Product_FK1", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Product>("RDWModel.Lab_Product_FK1", "Product", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Location_Lab_FK1", "Location")]
        public Location Location
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Location>("RDWModel.Location_Lab_FK1", "Location").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Location>("RDWModel.Location_Lab_FK1", "Location").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Location> LocationReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Location>("RDWModel.Location_Lab_FK1", "Location");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Location>("RDWModel.Location_Lab_FK1", "Location", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Lab_LabCloseSchedule_FK1", "LabCloseSchedule")]
        public EntityCollection<LabCloseSchedule> LabCloseSchedule
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<LabCloseSchedule>("RDWModel.Lab_LabCloseSchedule_FK1", "LabCloseSchedule");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<LabCloseSchedule>("RDWModel.Lab_LabCloseSchedule_FK1", "LabCloseSchedule", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Lab_Request_FK1", "Request")]
        public EntityCollection<Request> Request
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Request>("RDWModel.Lab_Request_FK1", "Request");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Request>("RDWModel.Lab_Request_FK1", "Request", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "LabCloseSchedule")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class LabCloseSchedule : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new LabCloseSchedule object.
        /// </summary>
        /// <param name="scheduleId">Initial value of the ScheduleId property.</param>
        /// <param name="startDate">Initial value of the StartDate property.</param>
        /// <param name="endDate">Initial value of the EndDate property.</param>
        /// <param name="reasonId">Initial value of the ReasonId property.</param>
        /// <param name="labId">Initial value of the LabId property.</param>
        public static LabCloseSchedule CreateLabCloseSchedule(global::System.Int32 scheduleId, global::System.DateTime startDate, global::System.DateTime endDate, global::System.Int32 reasonId, global::System.Int32 labId)
        {
            LabCloseSchedule labCloseSchedule = new LabCloseSchedule();
            labCloseSchedule.ScheduleId = scheduleId;
            labCloseSchedule.StartDate = startDate;
            labCloseSchedule.EndDate = endDate;
            labCloseSchedule.ReasonId = reasonId;
            labCloseSchedule.LabId = labId;
            return labCloseSchedule;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 ScheduleId
        {
            get
            {
                return _ScheduleId;
            }
            set
            {
                if (_ScheduleId != value)
                {
                    OnScheduleIdChanging(value);
                    ReportPropertyChanging("ScheduleId");
                    _ScheduleId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ScheduleId");
                    OnScheduleIdChanged();
                }
            }
        }
        private global::System.Int32 _ScheduleId;
        partial void OnScheduleIdChanging(global::System.Int32 value);
        partial void OnScheduleIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.DateTime StartDate
        {
            get
            {
                return _StartDate;
            }
            set
            {
                OnStartDateChanging(value);
                ReportPropertyChanging("StartDate");
                _StartDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("StartDate");
                OnStartDateChanged();
            }
        }
        private global::System.DateTime _StartDate;
        partial void OnStartDateChanging(global::System.DateTime value);
        partial void OnStartDateChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.DateTime EndDate
        {
            get
            {
                return _EndDate;
            }
            set
            {
                OnEndDateChanging(value);
                ReportPropertyChanging("EndDate");
                _EndDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EndDate");
                OnEndDateChanged();
            }
        }
        private global::System.DateTime _EndDate;
        partial void OnEndDateChanging(global::System.DateTime value);
        partial void OnEndDateChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 ReasonId
        {
            get
            {
                return _ReasonId;
            }
            set
            {
                OnReasonIdChanging(value);
                ReportPropertyChanging("ReasonId");
                _ReasonId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ReasonId");
                OnReasonIdChanged();
            }
        }
        private global::System.Int32 _ReasonId;
        partial void OnReasonIdChanging(global::System.Int32 value);
        partial void OnReasonIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String OtherReason
        {
            get
            {
                return _OtherReason;
            }
            set
            {
                OnOtherReasonChanging(value);
                ReportPropertyChanging("OtherReason");
                _OtherReason = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("OtherReason");
                OnOtherReasonChanged();
            }
        }
        private global::System.String _OtherReason;
        partial void OnOtherReasonChanging(global::System.String value);
        partial void OnOtherReasonChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Solution_CN
        {
            get
            {
                return _Solution_CN;
            }
            set
            {
                OnSolution_CNChanging(value);
                ReportPropertyChanging("Solution_CN");
                _Solution_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Solution_CN");
                OnSolution_CNChanged();
            }
        }
        private global::System.String _Solution_CN;
        partial void OnSolution_CNChanging(global::System.String value);
        partial void OnSolution_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Solution_EN
        {
            get
            {
                return _Solution_EN;
            }
            set
            {
                OnSolution_ENChanging(value);
                ReportPropertyChanging("Solution_EN");
                _Solution_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Solution_EN");
                OnSolution_ENChanged();
            }
        }
        private global::System.String _Solution_EN;
        partial void OnSolution_ENChanging(global::System.String value);
        partial void OnSolution_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 LabId
        {
            get
            {
                return _LabId;
            }
            set
            {
                OnLabIdChanging(value);
                ReportPropertyChanging("LabId");
                _LabId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LabId");
                OnLabIdChanged();
            }
        }
        private global::System.Int32 _LabId;
        partial void OnLabIdChanging(global::System.Int32 value);
        partial void OnLabIdChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Lab_LabCloseSchedule_FK1", "Lab")]
        public Lab Lab
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_LabCloseSchedule_FK1", "Lab").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_LabCloseSchedule_FK1", "Lab").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Lab> LabReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_LabCloseSchedule_FK1", "Lab");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Lab>("RDWModel.Lab_LabCloseSchedule_FK1", "Lab", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Reason_LabCloseSchedule_FK1", "Reason")]
        public Reason Reason
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Reason>("RDWModel.Reason_LabCloseSchedule_FK1", "Reason").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Reason>("RDWModel.Reason_LabCloseSchedule_FK1", "Reason").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Reason> ReasonReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Reason>("RDWModel.Reason_LabCloseSchedule_FK1", "Reason");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Reason>("RDWModel.Reason_LabCloseSchedule_FK1", "Reason", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "LabManager")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class LabManager : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new LabManager object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        public static LabManager CreateLabManager(global::System.Int32 id)
        {
            LabManager labManager = new LabManager();
            labManager.Id = id;
            return labManager;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> LabId
        {
            get
            {
                return _LabId;
            }
            set
            {
                OnLabIdChanging(value);
                ReportPropertyChanging("LabId");
                _LabId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LabId");
                OnLabIdChanged();
            }
        }
        private Nullable<global::System.Int32> _LabId;
        partial void OnLabIdChanging(Nullable<global::System.Int32> value);
        partial void OnLabIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> RoleId
        {
            get
            {
                return _RoleId;
            }
            set
            {
                OnRoleIdChanging(value);
                ReportPropertyChanging("RoleId");
                _RoleId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RoleId");
                OnRoleIdChanged();
            }
        }
        private Nullable<global::System.Int32> _RoleId;
        partial void OnRoleIdChanging(Nullable<global::System.Int32> value);
        partial void OnRoleIdChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Lab_LabManager_FK1", "Lab")]
        public Lab Lab
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_LabManager_FK1", "Lab").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_LabManager_FK1", "Lab").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Lab> LabReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_LabManager_FK1", "Lab");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Lab>("RDWModel.Lab_LabManager_FK1", "Lab", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Role_LabManager_FK1", "Role")]
        public Role Role
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("RDWModel.Role_LabManager_FK1", "Role").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("RDWModel.Role_LabManager_FK1", "Role").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Role> RoleReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("RDWModel.Role_LabManager_FK1", "Role");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Role>("RDWModel.Role_LabManager_FK1", "Role", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Location")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Location : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Location object.
        /// </summary>
        /// <param name="locationId">Initial value of the LocationId property.</param>
        /// <param name="name_CN">Initial value of the Name_CN property.</param>
        /// <param name="name_EN">Initial value of the Name_EN property.</param>
        public static Location CreateLocation(global::System.Int32 locationId, global::System.String name_CN, global::System.String name_EN)
        {
            Location location = new Location();
            location.LocationId = locationId;
            location.Name_CN = name_CN;
            location.Name_EN = name_EN;
            return location;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 LocationId
        {
            get
            {
                return _LocationId;
            }
            set
            {
                if (_LocationId != value)
                {
                    OnLocationIdChanging(value);
                    ReportPropertyChanging("LocationId");
                    _LocationId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("LocationId");
                    OnLocationIdChanged();
                }
            }
        }
        private global::System.Int32 _LocationId;
        partial void OnLocationIdChanging(global::System.Int32 value);
        partial void OnLocationIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Name_CN
        {
            get
            {
                return _Name_CN;
            }
            set
            {
                OnName_CNChanging(value);
                ReportPropertyChanging("Name_CN");
                _Name_CN = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name_CN");
                OnName_CNChanged();
            }
        }
        private global::System.String _Name_CN;
        partial void OnName_CNChanging(global::System.String value);
        partial void OnName_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Name_EN
        {
            get
            {
                return _Name_EN;
            }
            set
            {
                OnName_ENChanging(value);
                ReportPropertyChanging("Name_EN");
                _Name_EN = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name_EN");
                OnName_ENChanged();
            }
        }
        private global::System.String _Name_EN;
        partial void OnName_ENChanging(global::System.String value);
        partial void OnName_ENChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Location_Lab_FK1", "Lab")]
        public EntityCollection<Lab> Lab
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Lab>("RDWModel.Location_Lab_FK1", "Lab");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Lab>("RDWModel.Location_Lab_FK1", "Lab", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Location_SiteManager_FK1", "SiteManager")]
        public EntityCollection<SiteManager> SiteManager
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SiteManager>("RDWModel.Location_SiteManager_FK1", "SiteManager");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SiteManager>("RDWModel.Location_SiteManager_FK1", "SiteManager", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "LocationDocument")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class LocationDocument : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new LocationDocument object.
        /// </summary>
        /// <param name="locationDocumentId">Initial value of the LocationDocumentId property.</param>
        /// <param name="locationId">Initial value of the LocationId property.</param>
        /// <param name="path">Initial value of the Path property.</param>
        /// <param name="createBy">Initial value of the CreateBy property.</param>
        /// <param name="lastModifyTime">Initial value of the LastModifyTime property.</param>
        public static LocationDocument CreateLocationDocument(global::System.Int32 locationDocumentId, global::System.Int32 locationId, global::System.String path, global::System.Int32 createBy, global::System.DateTime lastModifyTime)
        {
            LocationDocument locationDocument = new LocationDocument();
            locationDocument.LocationDocumentId = locationDocumentId;
            locationDocument.LocationId = locationId;
            locationDocument.Path = path;
            locationDocument.CreateBy = createBy;
            locationDocument.LastModifyTime = lastModifyTime;
            return locationDocument;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 LocationDocumentId
        {
            get
            {
                return _LocationDocumentId;
            }
            set
            {
                if (_LocationDocumentId != value)
                {
                    OnLocationDocumentIdChanging(value);
                    ReportPropertyChanging("LocationDocumentId");
                    _LocationDocumentId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("LocationDocumentId");
                    OnLocationDocumentIdChanged();
                }
            }
        }
        private global::System.Int32 _LocationDocumentId;
        partial void OnLocationDocumentIdChanging(global::System.Int32 value);
        partial void OnLocationDocumentIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 LocationId
        {
            get
            {
                return _LocationId;
            }
            set
            {
                OnLocationIdChanging(value);
                ReportPropertyChanging("LocationId");
                _LocationId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LocationId");
                OnLocationIdChanged();
            }
        }
        private global::System.Int32 _LocationId;
        partial void OnLocationIdChanging(global::System.Int32 value);
        partial void OnLocationIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Name_CN
        {
            get
            {
                return _Name_CN;
            }
            set
            {
                OnName_CNChanging(value);
                ReportPropertyChanging("Name_CN");
                _Name_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Name_CN");
                OnName_CNChanged();
            }
        }
        private global::System.String _Name_CN;
        partial void OnName_CNChanging(global::System.String value);
        partial void OnName_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Name_EN
        {
            get
            {
                return _Name_EN;
            }
            set
            {
                OnName_ENChanging(value);
                ReportPropertyChanging("Name_EN");
                _Name_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Name_EN");
                OnName_ENChanged();
            }
        }
        private global::System.String _Name_EN;
        partial void OnName_ENChanging(global::System.String value);
        partial void OnName_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Path
        {
            get
            {
                return _Path;
            }
            set
            {
                OnPathChanging(value);
                ReportPropertyChanging("Path");
                _Path = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Path");
                OnPathChanged();
            }
        }
        private global::System.String _Path;
        partial void OnPathChanging(global::System.String value);
        partial void OnPathChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 CreateBy
        {
            get
            {
                return _CreateBy;
            }
            set
            {
                OnCreateByChanging(value);
                ReportPropertyChanging("CreateBy");
                _CreateBy = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreateBy");
                OnCreateByChanged();
            }
        }
        private global::System.Int32 _CreateBy;
        partial void OnCreateByChanging(global::System.Int32 value);
        partial void OnCreateByChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.DateTime LastModifyTime
        {
            get
            {
                return _LastModifyTime;
            }
            set
            {
                OnLastModifyTimeChanging(value);
                ReportPropertyChanging("LastModifyTime");
                _LastModifyTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LastModifyTime");
                OnLastModifyTimeChanged();
            }
        }
        private global::System.DateTime _LastModifyTime;
        partial void OnLastModifyTimeChanging(global::System.DateTime value);
        partial void OnLastModifyTimeChanged();

        #endregion

    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "MailTemplate")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class MailTemplate : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new MailTemplate object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        public static MailTemplate CreateMailTemplate(global::System.Int32 id)
        {
            MailTemplate mailTemplate = new MailTemplate();
            mailTemplate.Id = id;
            return mailTemplate;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Subject
        {
            get
            {
                return _Subject;
            }
            set
            {
                OnSubjectChanging(value);
                ReportPropertyChanging("Subject");
                _Subject = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Subject");
                OnSubjectChanged();
            }
        }
        private global::System.String _Subject;
        partial void OnSubjectChanging(global::System.String value);
        partial void OnSubjectChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Template
        {
            get
            {
                return _Template;
            }
            set
            {
                OnTemplateChanging(value);
                ReportPropertyChanging("Template");
                _Template = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Template");
                OnTemplateChanged();
            }
        }
        private global::System.String _Template;
        partial void OnTemplateChanging(global::System.String value);
        partial void OnTemplateChanged();

        #endregion

    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "PerfectPicture")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class PerfectPicture : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new PerfectPicture object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="path">Initial value of the Path property.</param>
        public static PerfectPicture CreatePerfectPicture(global::System.Int32 id, global::System.String path)
        {
            PerfectPicture perfectPicture = new PerfectPicture();
            perfectPicture.Id = id;
            perfectPicture.Path = path;
            return perfectPicture;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Path
        {
            get
            {
                return _Path;
            }
            set
            {
                OnPathChanging(value);
                ReportPropertyChanging("Path");
                _Path = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Path");
                OnPathChanged();
            }
        }
        private global::System.String _Path;
        partial void OnPathChanging(global::System.String value);
        partial void OnPathChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Desc_CN
        {
            get
            {
                return _Desc_CN;
            }
            set
            {
                OnDesc_CNChanging(value);
                ReportPropertyChanging("Desc_CN");
                _Desc_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Desc_CN");
                OnDesc_CNChanged();
            }
        }
        private global::System.String _Desc_CN;
        partial void OnDesc_CNChanging(global::System.String value);
        partial void OnDesc_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Desc_EN
        {
            get
            {
                return _Desc_EN;
            }
            set
            {
                OnDesc_ENChanging(value);
                ReportPropertyChanging("Desc_EN");
                _Desc_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Desc_EN");
                OnDesc_ENChanged();
            }
        }
        private global::System.String _Desc_EN;
        partial void OnDesc_ENChanging(global::System.String value);
        partial void OnDesc_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> CreatTime
        {
            get
            {
                return _CreatTime;
            }
            set
            {
                OnCreatTimeChanging(value);
                ReportPropertyChanging("CreatTime");
                _CreatTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreatTime");
                OnCreatTimeChanged();
            }
        }
        private Nullable<global::System.DateTime> _CreatTime;
        partial void OnCreatTimeChanging(Nullable<global::System.DateTime> value);
        partial void OnCreatTimeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> CreateBy
        {
            get
            {
                return _CreateBy;
            }
            set
            {
                OnCreateByChanging(value);
                ReportPropertyChanging("CreateBy");
                _CreateBy = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreateBy");
                OnCreateByChanged();
            }
        }
        private Nullable<global::System.Int32> _CreateBy;
        partial void OnCreateByChanging(Nullable<global::System.Int32> value);
        partial void OnCreateByChanged();

        #endregion

    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Priviledge")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Priviledge : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Priviledge object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="pagePath">Initial value of the PagePath property.</param>
        /// <param name="enable">Initial value of the Enable property.</param>
        public static Priviledge CreatePriviledge(global::System.Int32 id, global::System.String pagePath, global::System.Boolean enable)
        {
            Priviledge priviledge = new Priviledge();
            priviledge.Id = id;
            priviledge.PagePath = pagePath;
            priviledge.Enable = enable;
            return priviledge;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> RoleId
        {
            get
            {
                return _RoleId;
            }
            set
            {
                OnRoleIdChanging(value);
                ReportPropertyChanging("RoleId");
                _RoleId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RoleId");
                OnRoleIdChanged();
            }
        }
        private Nullable<global::System.Int32> _RoleId;
        partial void OnRoleIdChanging(Nullable<global::System.Int32> value);
        partial void OnRoleIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> UserId
        {
            get
            {
                return _UserId;
            }
            set
            {
                OnUserIdChanging(value);
                ReportPropertyChanging("UserId");
                _UserId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("UserId");
                OnUserIdChanged();
            }
        }
        private Nullable<global::System.Int32> _UserId;
        partial void OnUserIdChanging(Nullable<global::System.Int32> value);
        partial void OnUserIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String PagePath
        {
            get
            {
                return _PagePath;
            }
            set
            {
                OnPagePathChanging(value);
                ReportPropertyChanging("PagePath");
                _PagePath = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("PagePath");
                OnPagePathChanged();
            }
        }
        private global::System.String _PagePath;
        partial void OnPagePathChanging(global::System.String value);
        partial void OnPagePathChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Boolean Enable
        {
            get
            {
                return _Enable;
            }
            set
            {
                OnEnableChanging(value);
                ReportPropertyChanging("Enable");
                _Enable = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Enable");
                OnEnableChanged();
            }
        }
        private global::System.Boolean _Enable;
        partial void OnEnableChanging(global::System.Boolean value);
        partial void OnEnableChanged();

        #endregion

    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Product")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Product : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Product object.
        /// </summary>
        /// <param name="productId">Initial value of the ProductId property.</param>
        /// <param name="labId">Initial value of the LabId property.</param>
        /// <param name="name_CN">Initial value of the Name_CN property.</param>
        /// <param name="name_EN">Initial value of the Name_EN property.</param>
        /// <param name="chineseIntroduce">Initial value of the ChineseIntroduce property.</param>
        /// <param name="englishIntroduce">Initial value of the EnglishIntroduce property.</param>
        /// <param name="status">Initial value of the Status property.</param>
        public static Product CreateProduct(global::System.Int32 productId, global::System.Int32 labId, global::System.String name_CN, global::System.String name_EN, global::System.Boolean chineseIntroduce, global::System.Boolean englishIntroduce, global::System.Int32 status)
        {
            Product product = new Product();
            product.ProductId = productId;
            product.LabId = labId;
            product.Name_CN = name_CN;
            product.Name_EN = name_EN;
            product.ChineseIntroduce = chineseIntroduce;
            product.EnglishIntroduce = englishIntroduce;
            product.Status = status;
            return product;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 ProductId
        {
            get
            {
                return _ProductId;
            }
            set
            {
                if (_ProductId != value)
                {
                    OnProductIdChanging(value);
                    ReportPropertyChanging("ProductId");
                    _ProductId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ProductId");
                    OnProductIdChanged();
                }
            }
        }
        private global::System.Int32 _ProductId;
        partial void OnProductIdChanging(global::System.Int32 value);
        partial void OnProductIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 LabId
        {
            get
            {
                return _LabId;
            }
            set
            {
                OnLabIdChanging(value);
                ReportPropertyChanging("LabId");
                _LabId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LabId");
                OnLabIdChanged();
            }
        }
        private global::System.Int32 _LabId;
        partial void OnLabIdChanging(global::System.Int32 value);
        partial void OnLabIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Name_CN
        {
            get
            {
                return _Name_CN;
            }
            set
            {
                OnName_CNChanging(value);
                ReportPropertyChanging("Name_CN");
                _Name_CN = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name_CN");
                OnName_CNChanged();
            }
        }
        private global::System.String _Name_CN;
        partial void OnName_CNChanging(global::System.String value);
        partial void OnName_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String DemoType_CN
        {
            get
            {
                return _DemoType_CN;
            }
            set
            {
                OnDemoType_CNChanging(value);
                ReportPropertyChanging("DemoType_CN");
                _DemoType_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("DemoType_CN");
                OnDemoType_CNChanged();
            }
        }
        private global::System.String _DemoType_CN;
        partial void OnDemoType_CNChanging(global::System.String value);
        partial void OnDemoType_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String DemoContent_CN
        {
            get
            {
                return _DemoContent_CN;
            }
            set
            {
                OnDemoContent_CNChanging(value);
                ReportPropertyChanging("DemoContent_CN");
                _DemoContent_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("DemoContent_CN");
                OnDemoContent_CNChanged();
            }
        }
        private global::System.String _DemoContent_CN;
        partial void OnDemoContent_CNChanging(global::System.String value);
        partial void OnDemoContent_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String DemoStep_CN
        {
            get
            {
                return _DemoStep_CN;
            }
            set
            {
                OnDemoStep_CNChanging(value);
                ReportPropertyChanging("DemoStep_CN");
                _DemoStep_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("DemoStep_CN");
                OnDemoStep_CNChanged();
            }
        }
        private global::System.String _DemoStep_CN;
        partial void OnDemoStep_CNChanging(global::System.String value);
        partial void OnDemoStep_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String KeyComments_CN
        {
            get
            {
                return _KeyComments_CN;
            }
            set
            {
                OnKeyComments_CNChanging(value);
                ReportPropertyChanging("KeyComments_CN");
                _KeyComments_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("KeyComments_CN");
                OnKeyComments_CNChanged();
            }
        }
        private global::System.String _KeyComments_CN;
        partial void OnKeyComments_CNChanging(global::System.String value);
        partial void OnKeyComments_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Equipment_CN
        {
            get
            {
                return _Equipment_CN;
            }
            set
            {
                OnEquipment_CNChanging(value);
                ReportPropertyChanging("Equipment_CN");
                _Equipment_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Equipment_CN");
                OnEquipment_CNChanged();
            }
        }
        private global::System.String _Equipment_CN;
        partial void OnEquipment_CNChanging(global::System.String value);
        partial void OnEquipment_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Name_EN
        {
            get
            {
                return _Name_EN;
            }
            set
            {
                OnName_ENChanging(value);
                ReportPropertyChanging("Name_EN");
                _Name_EN = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name_EN");
                OnName_ENChanged();
            }
        }
        private global::System.String _Name_EN;
        partial void OnName_ENChanging(global::System.String value);
        partial void OnName_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String DemoType_EN
        {
            get
            {
                return _DemoType_EN;
            }
            set
            {
                OnDemoType_ENChanging(value);
                ReportPropertyChanging("DemoType_EN");
                _DemoType_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("DemoType_EN");
                OnDemoType_ENChanged();
            }
        }
        private global::System.String _DemoType_EN;
        partial void OnDemoType_ENChanging(global::System.String value);
        partial void OnDemoType_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String DemoContent_EN
        {
            get
            {
                return _DemoContent_EN;
            }
            set
            {
                OnDemoContent_ENChanging(value);
                ReportPropertyChanging("DemoContent_EN");
                _DemoContent_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("DemoContent_EN");
                OnDemoContent_ENChanged();
            }
        }
        private global::System.String _DemoContent_EN;
        partial void OnDemoContent_ENChanging(global::System.String value);
        partial void OnDemoContent_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String DemoStep_EN
        {
            get
            {
                return _DemoStep_EN;
            }
            set
            {
                OnDemoStep_ENChanging(value);
                ReportPropertyChanging("DemoStep_EN");
                _DemoStep_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("DemoStep_EN");
                OnDemoStep_ENChanged();
            }
        }
        private global::System.String _DemoStep_EN;
        partial void OnDemoStep_ENChanging(global::System.String value);
        partial void OnDemoStep_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String KeyComment_EN
        {
            get
            {
                return _KeyComment_EN;
            }
            set
            {
                OnKeyComment_ENChanging(value);
                ReportPropertyChanging("KeyComment_EN");
                _KeyComment_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("KeyComment_EN");
                OnKeyComment_ENChanged();
            }
        }
        private global::System.String _KeyComment_EN;
        partial void OnKeyComment_ENChanging(global::System.String value);
        partial void OnKeyComment_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Equipment_EN
        {
            get
            {
                return _Equipment_EN;
            }
            set
            {
                OnEquipment_ENChanging(value);
                ReportPropertyChanging("Equipment_EN");
                _Equipment_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Equipment_EN");
                OnEquipment_ENChanged();
            }
        }
        private global::System.String _Equipment_EN;
        partial void OnEquipment_ENChanging(global::System.String value);
        partial void OnEquipment_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Boolean ChineseIntroduce
        {
            get
            {
                return _ChineseIntroduce;
            }
            set
            {
                OnChineseIntroduceChanging(value);
                ReportPropertyChanging("ChineseIntroduce");
                _ChineseIntroduce = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ChineseIntroduce");
                OnChineseIntroduceChanged();
            }
        }
        private global::System.Boolean _ChineseIntroduce;
        partial void OnChineseIntroduceChanging(global::System.Boolean value);
        partial void OnChineseIntroduceChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Boolean EnglishIntroduce
        {
            get
            {
                return _EnglishIntroduce;
            }
            set
            {
                OnEnglishIntroduceChanging(value);
                ReportPropertyChanging("EnglishIntroduce");
                _EnglishIntroduce = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EnglishIntroduce");
                OnEnglishIntroduceChanged();
            }
        }
        private global::System.Boolean _EnglishIntroduce;
        partial void OnEnglishIntroduceChanging(global::System.Boolean value);
        partial void OnEnglishIntroduceChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Status
        {
            get
            {
                return _Status;
            }
            set
            {
                OnStatusChanging(value);
                ReportPropertyChanging("Status");
                _Status = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Status");
                OnStatusChanged();
            }
        }
        private global::System.Int32 _Status;
        partial void OnStatusChanging(global::System.Int32 value);
        partial void OnStatusChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Lab_Product_FK1", "Lab")]
        public Lab Lab
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_Product_FK1", "Lab").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_Product_FK1", "Lab").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Lab> LabReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_Product_FK1", "Lab");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Lab>("RDWModel.Lab_Product_FK1", "Lab", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Product_ProductPic_FK1", "ProductPic")]
        public EntityCollection<ProductPic> ProductPic
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<ProductPic>("RDWModel.Product_ProductPic_FK1", "ProductPic");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<ProductPic>("RDWModel.Product_ProductPic_FK1", "ProductPic", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Product_VisitProduct_FK1", "VisitProduct")]
        public EntityCollection<VisitProduct> VisitProduct
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<VisitProduct>("RDWModel.Product_VisitProduct_FK1", "VisitProduct");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<VisitProduct>("RDWModel.Product_VisitProduct_FK1", "VisitProduct", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "ProductPic")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class ProductPic : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new ProductPic object.
        /// </summary>
        /// <param name="productPicId">Initial value of the ProductPicId property.</param>
        /// <param name="productId">Initial value of the ProductId property.</param>
        /// <param name="path">Initial value of the Path property.</param>
        public static ProductPic CreateProductPic(global::System.Int32 productPicId, global::System.Int32 productId, global::System.String path)
        {
            ProductPic productPic = new ProductPic();
            productPic.ProductPicId = productPicId;
            productPic.ProductId = productId;
            productPic.Path = path;
            return productPic;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 ProductPicId
        {
            get
            {
                return _ProductPicId;
            }
            set
            {
                if (_ProductPicId != value)
                {
                    OnProductPicIdChanging(value);
                    ReportPropertyChanging("ProductPicId");
                    _ProductPicId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ProductPicId");
                    OnProductPicIdChanged();
                }
            }
        }
        private global::System.Int32 _ProductPicId;
        partial void OnProductPicIdChanging(global::System.Int32 value);
        partial void OnProductPicIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 ProductId
        {
            get
            {
                return _ProductId;
            }
            set
            {
                OnProductIdChanging(value);
                ReportPropertyChanging("ProductId");
                _ProductId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ProductId");
                OnProductIdChanged();
            }
        }
        private global::System.Int32 _ProductId;
        partial void OnProductIdChanging(global::System.Int32 value);
        partial void OnProductIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Path
        {
            get
            {
                return _Path;
            }
            set
            {
                OnPathChanging(value);
                ReportPropertyChanging("Path");
                _Path = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Path");
                OnPathChanged();
            }
        }
        private global::System.String _Path;
        partial void OnPathChanging(global::System.String value);
        partial void OnPathChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Product_ProductPic_FK1", "Product")]
        public Product Product
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Product>("RDWModel.Product_ProductPic_FK1", "Product").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Product>("RDWModel.Product_ProductPic_FK1", "Product").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Product> ProductReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Product>("RDWModel.Product_ProductPic_FK1", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Product>("RDWModel.Product_ProductPic_FK1", "Product", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Question")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Question : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Question object.
        /// </summary>
        /// <param name="questionId">Initial value of the QuestionId property.</param>
        /// <param name="status">Initial value of the Status property.</param>
        public static Question CreateQuestion(global::System.Int32 questionId, global::System.Int32 status)
        {
            Question question = new Question();
            question.QuestionId = questionId;
            question.Status = status;
            return question;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 QuestionId
        {
            get
            {
                return _QuestionId;
            }
            set
            {
                if (_QuestionId != value)
                {
                    OnQuestionIdChanging(value);
                    ReportPropertyChanging("QuestionId");
                    _QuestionId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("QuestionId");
                    OnQuestionIdChanged();
                }
            }
        }
        private global::System.Int32 _QuestionId;
        partial void OnQuestionIdChanging(global::System.Int32 value);
        partial void OnQuestionIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Question_CN
        {
            get
            {
                return _Question_CN;
            }
            set
            {
                OnQuestion_CNChanging(value);
                ReportPropertyChanging("Question_CN");
                _Question_CN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Question_CN");
                OnQuestion_CNChanged();
            }
        }
        private global::System.String _Question_CN;
        partial void OnQuestion_CNChanging(global::System.String value);
        partial void OnQuestion_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Question_EN
        {
            get
            {
                return _Question_EN;
            }
            set
            {
                OnQuestion_ENChanging(value);
                ReportPropertyChanging("Question_EN");
                _Question_EN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Question_EN");
                OnQuestion_ENChanged();
            }
        }
        private global::System.String _Question_EN;
        partial void OnQuestion_ENChanging(global::System.String value);
        partial void OnQuestion_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Status
        {
            get
            {
                return _Status;
            }
            set
            {
                OnStatusChanging(value);
                ReportPropertyChanging("Status");
                _Status = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Status");
                OnStatusChanged();
            }
        }
        private global::System.Int32 _Status;
        partial void OnStatusChanging(global::System.Int32 value);
        partial void OnStatusChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Question_Answer_FK1", "Answer")]
        public EntityCollection<Answer> Answer
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Answer>("RDWModel.Question_Answer_FK1", "Answer");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Answer>("RDWModel.Question_Answer_FK1", "Answer", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Reason")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Reason : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Reason object.
        /// </summary>
        /// <param name="reasonId">Initial value of the ReasonId property.</param>
        /// <param name="desc_CN">Initial value of the Desc_CN property.</param>
        /// <param name="desc_EN">Initial value of the Desc_EN property.</param>
        public static Reason CreateReason(global::System.Int32 reasonId, global::System.String desc_CN, global::System.String desc_EN)
        {
            Reason reason = new Reason();
            reason.ReasonId = reasonId;
            reason.Desc_CN = desc_CN;
            reason.Desc_EN = desc_EN;
            return reason;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 ReasonId
        {
            get
            {
                return _ReasonId;
            }
            set
            {
                if (_ReasonId != value)
                {
                    OnReasonIdChanging(value);
                    ReportPropertyChanging("ReasonId");
                    _ReasonId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ReasonId");
                    OnReasonIdChanged();
                }
            }
        }
        private global::System.Int32 _ReasonId;
        partial void OnReasonIdChanging(global::System.Int32 value);
        partial void OnReasonIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Desc_CN
        {
            get
            {
                return _Desc_CN;
            }
            set
            {
                OnDesc_CNChanging(value);
                ReportPropertyChanging("Desc_CN");
                _Desc_CN = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Desc_CN");
                OnDesc_CNChanged();
            }
        }
        private global::System.String _Desc_CN;
        partial void OnDesc_CNChanging(global::System.String value);
        partial void OnDesc_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Desc_EN
        {
            get
            {
                return _Desc_EN;
            }
            set
            {
                OnDesc_ENChanging(value);
                ReportPropertyChanging("Desc_EN");
                _Desc_EN = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Desc_EN");
                OnDesc_ENChanged();
            }
        }
        private global::System.String _Desc_EN;
        partial void OnDesc_ENChanging(global::System.String value);
        partial void OnDesc_ENChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Reason_LabCloseSchedule_FK1", "LabCloseSchedule")]
        public EntityCollection<LabCloseSchedule> LabCloseSchedule
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<LabCloseSchedule>("RDWModel.Reason_LabCloseSchedule_FK1", "LabCloseSchedule");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<LabCloseSchedule>("RDWModel.Reason_LabCloseSchedule_FK1", "LabCloseSchedule", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "RentRequest")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class RentRequest : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new RentRequest object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="purpose">Initial value of the Purpose property.</param>
        /// <param name="rentPerson">Initial value of the RentPerson property.</param>
        /// <param name="personNum">Initial value of the PersonNum property.</param>
        public static RentRequest CreateRentRequest(global::System.Int32 id, global::System.String purpose, global::System.String rentPerson, global::System.Int32 personNum)
        {
            RentRequest rentRequest = new RentRequest();
            rentRequest.Id = id;
            rentRequest.Purpose = purpose;
            rentRequest.RentPerson = rentPerson;
            rentRequest.PersonNum = personNum;
            return rentRequest;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> RequestId
        {
            get
            {
                return _RequestId;
            }
            set
            {
                OnRequestIdChanging(value);
                ReportPropertyChanging("RequestId");
                _RequestId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RequestId");
                OnRequestIdChanged();
            }
        }
        private Nullable<global::System.Int32> _RequestId;
        partial void OnRequestIdChanging(Nullable<global::System.Int32> value);
        partial void OnRequestIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Purpose
        {
            get
            {
                return _Purpose;
            }
            set
            {
                OnPurposeChanging(value);
                ReportPropertyChanging("Purpose");
                _Purpose = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Purpose");
                OnPurposeChanged();
            }
        }
        private global::System.String _Purpose;
        partial void OnPurposeChanging(global::System.String value);
        partial void OnPurposeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String RentPerson
        {
            get
            {
                return _RentPerson;
            }
            set
            {
                OnRentPersonChanging(value);
                ReportPropertyChanging("RentPerson");
                _RentPerson = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("RentPerson");
                OnRentPersonChanged();
            }
        }
        private global::System.String _RentPerson;
        partial void OnRentPersonChanging(global::System.String value);
        partial void OnRentPersonChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 PersonNum
        {
            get
            {
                return _PersonNum;
            }
            set
            {
                OnPersonNumChanging(value);
                ReportPropertyChanging("PersonNum");
                _PersonNum = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("PersonNum");
                OnPersonNumChanged();
            }
        }
        private global::System.Int32 _PersonNum;
        partial void OnPersonNumChanging(global::System.Int32 value);
        partial void OnPersonNumChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String OtherRequirements
        {
            get
            {
                return _OtherRequirements;
            }
            set
            {
                OnOtherRequirementsChanging(value);
                ReportPropertyChanging("OtherRequirements");
                _OtherRequirements = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("OtherRequirements");
                OnOtherRequirementsChanged();
            }
        }
        private global::System.String _OtherRequirements;
        partial void OnOtherRequirementsChanging(global::System.String value);
        partial void OnOtherRequirementsChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Request_RentRequest_FK1", "Request")]
        public Request Request
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_RentRequest_FK1", "Request").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_RentRequest_FK1", "Request").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Request> RequestReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_RentRequest_FK1", "Request");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Request>("RDWModel.Request_RentRequest_FK1", "Request", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Request")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Request : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Request object.
        /// </summary>
        /// <param name="requestId">Initial value of the RequestId property.</param>
        /// <param name="labId">Initial value of the LabId property.</param>
        /// <param name="requestDate">Initial value of the RequestDate property.</param>
        /// <param name="startTime">Initial value of the StartTime property.</param>
        /// <param name="endTime">Initial value of the EndTime property.</param>
        /// <param name="requestType">Initial value of the RequestType property.</param>
        /// <param name="requestUserId">Initial value of the RequestUserId property.</param>
        /// <param name="status">Initial value of the Status property.</param>
        /// <param name="createTime">Initial value of the CreateTime property.</param>
        public static Request CreateRequest(global::System.Int32 requestId, global::System.Int32 labId, global::System.DateTime requestDate, global::System.TimeSpan startTime, global::System.TimeSpan endTime, global::System.Int32 requestType, global::System.Int32 requestUserId, global::System.Int32 status, global::System.DateTime createTime)
        {
            Request request = new Request();
            request.RequestId = requestId;
            request.LabId = labId;
            request.RequestDate = requestDate;
            request.StartTime = startTime;
            request.EndTime = endTime;
            request.RequestType = requestType;
            request.RequestUserId = requestUserId;
            request.Status = status;
            request.CreateTime = createTime;
            return request;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 RequestId
        {
            get
            {
                return _RequestId;
            }
            set
            {
                if (_RequestId != value)
                {
                    OnRequestIdChanging(value);
                    ReportPropertyChanging("RequestId");
                    _RequestId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("RequestId");
                    OnRequestIdChanged();
                }
            }
        }
        private global::System.Int32 _RequestId;
        partial void OnRequestIdChanging(global::System.Int32 value);
        partial void OnRequestIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 LabId
        {
            get
            {
                return _LabId;
            }
            set
            {
                OnLabIdChanging(value);
                ReportPropertyChanging("LabId");
                _LabId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LabId");
                OnLabIdChanged();
            }
        }
        private global::System.Int32 _LabId;
        partial void OnLabIdChanging(global::System.Int32 value);
        partial void OnLabIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.DateTime RequestDate
        {
            get
            {
                return _RequestDate;
            }
            set
            {
                OnRequestDateChanging(value);
                ReportPropertyChanging("RequestDate");
                _RequestDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RequestDate");
                OnRequestDateChanged();
            }
        }
        private global::System.DateTime _RequestDate;
        partial void OnRequestDateChanging(global::System.DateTime value);
        partial void OnRequestDateChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.TimeSpan StartTime
        {
            get
            {
                return _StartTime;
            }
            set
            {
                OnStartTimeChanging(value);
                ReportPropertyChanging("StartTime");
                _StartTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("StartTime");
                OnStartTimeChanged();
            }
        }
        private global::System.TimeSpan _StartTime;
        partial void OnStartTimeChanging(global::System.TimeSpan value);
        partial void OnStartTimeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.TimeSpan EndTime
        {
            get
            {
                return _EndTime;
            }
            set
            {
                OnEndTimeChanging(value);
                ReportPropertyChanging("EndTime");
                _EndTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EndTime");
                OnEndTimeChanged();
            }
        }
        private global::System.TimeSpan _EndTime;
        partial void OnEndTimeChanging(global::System.TimeSpan value);
        partial void OnEndTimeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 RequestType
        {
            get
            {
                return _RequestType;
            }
            set
            {
                OnRequestTypeChanging(value);
                ReportPropertyChanging("RequestType");
                _RequestType = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RequestType");
                OnRequestTypeChanged();
            }
        }
        private global::System.Int32 _RequestType;
        partial void OnRequestTypeChanging(global::System.Int32 value);
        partial void OnRequestTypeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 RequestUserId
        {
            get
            {
                return _RequestUserId;
            }
            set
            {
                OnRequestUserIdChanging(value);
                ReportPropertyChanging("RequestUserId");
                _RequestUserId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RequestUserId");
                OnRequestUserIdChanged();
            }
        }
        private global::System.Int32 _RequestUserId;
        partial void OnRequestUserIdChanging(global::System.Int32 value);
        partial void OnRequestUserIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Status
        {
            get
            {
                return _Status;
            }
            set
            {
                OnStatusChanging(value);
                ReportPropertyChanging("Status");
                _Status = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Status");
                OnStatusChanged();
            }
        }
        private global::System.Int32 _Status;
        partial void OnStatusChanging(global::System.Int32 value);
        partial void OnStatusChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.DateTime CreateTime
        {
            get
            {
                return _CreateTime;
            }
            set
            {
                OnCreateTimeChanging(value);
                ReportPropertyChanging("CreateTime");
                _CreateTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreateTime");
                OnCreateTimeChanged();
            }
        }
        private global::System.DateTime _CreateTime;
        partial void OnCreateTimeChanging(global::System.DateTime value);
        partial void OnCreateTimeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Comments
        {
            get
            {
                return _Comments;
            }
            set
            {
                OnCommentsChanging(value);
                ReportPropertyChanging("Comments");
                _Comments = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Comments");
                OnCommentsChanged();
            }
        }
        private global::System.String _Comments;
        partial void OnCommentsChanging(global::System.String value);
        partial void OnCommentsChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Request_Feedback_FK1", "Feedback")]
        public EntityCollection<Feedback> Feedback
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Feedback>("RDWModel.Request_Feedback_FK1", "Feedback");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Feedback>("RDWModel.Request_Feedback_FK1", "Feedback", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Lab_Request_FK1", "Lab")]
        public Lab Lab
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_Request_FK1", "Lab").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_Request_FK1", "Lab").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Lab> LabReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Lab>("RDWModel.Lab_Request_FK1", "Lab");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Lab>("RDWModel.Lab_Request_FK1", "Lab", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Request_RequestLog_FK1", "RequestLog")]
        public EntityCollection<RequestLog> RequestLog
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<RequestLog>("RDWModel.Request_RequestLog_FK1", "RequestLog");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<RequestLog>("RDWModel.Request_RequestLog_FK1", "RequestLog", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Request_RentRequest_FK1", "RentRequest")]
        public EntityCollection<RentRequest> RentRequest
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<RentRequest>("RDWModel.Request_RentRequest_FK1", "RentRequest");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<RentRequest>("RDWModel.Request_RentRequest_FK1", "RentRequest", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Request_TestRequest_FK1", "TestRequest")]
        public EntityCollection<TestRequest> TestRequest
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<TestRequest>("RDWModel.Request_TestRequest_FK1", "TestRequest");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<TestRequest>("RDWModel.Request_TestRequest_FK1", "TestRequest", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Request_VisitRequest_FK1", "VisitRequest")]
        public EntityCollection<VisitRequest> VisitRequest
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<VisitRequest>("RDWModel.Request_VisitRequest_FK1", "VisitRequest");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<VisitRequest>("RDWModel.Request_VisitRequest_FK1", "VisitRequest", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "RequestLog")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class RequestLog : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new RequestLog object.
        /// </summary>
        /// <param name="logId">Initial value of the LogId property.</param>
        /// <param name="requestId">Initial value of the RequestId property.</param>
        /// <param name="statusFrom">Initial value of the StatusFrom property.</param>
        /// <param name="statusTo">Initial value of the StatusTo property.</param>
        /// <param name="createTime">Initial value of the CreateTime property.</param>
        public static RequestLog CreateRequestLog(global::System.Int32 logId, global::System.Int32 requestId, global::System.Int32 statusFrom, global::System.Int32 statusTo, global::System.DateTime createTime)
        {
            RequestLog requestLog = new RequestLog();
            requestLog.LogId = logId;
            requestLog.RequestId = requestId;
            requestLog.StatusFrom = statusFrom;
            requestLog.StatusTo = statusTo;
            requestLog.CreateTime = createTime;
            return requestLog;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 LogId
        {
            get
            {
                return _LogId;
            }
            set
            {
                if (_LogId != value)
                {
                    OnLogIdChanging(value);
                    ReportPropertyChanging("LogId");
                    _LogId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("LogId");
                    OnLogIdChanged();
                }
            }
        }
        private global::System.Int32 _LogId;
        partial void OnLogIdChanging(global::System.Int32 value);
        partial void OnLogIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 RequestId
        {
            get
            {
                return _RequestId;
            }
            set
            {
                OnRequestIdChanging(value);
                ReportPropertyChanging("RequestId");
                _RequestId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RequestId");
                OnRequestIdChanged();
            }
        }
        private global::System.Int32 _RequestId;
        partial void OnRequestIdChanging(global::System.Int32 value);
        partial void OnRequestIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 StatusFrom
        {
            get
            {
                return _StatusFrom;
            }
            set
            {
                OnStatusFromChanging(value);
                ReportPropertyChanging("StatusFrom");
                _StatusFrom = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("StatusFrom");
                OnStatusFromChanged();
            }
        }
        private global::System.Int32 _StatusFrom;
        partial void OnStatusFromChanging(global::System.Int32 value);
        partial void OnStatusFromChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 StatusTo
        {
            get
            {
                return _StatusTo;
            }
            set
            {
                OnStatusToChanging(value);
                ReportPropertyChanging("StatusTo");
                _StatusTo = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("StatusTo");
                OnStatusToChanged();
            }
        }
        private global::System.Int32 _StatusTo;
        partial void OnStatusToChanging(global::System.Int32 value);
        partial void OnStatusToChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Comments
        {
            get
            {
                return _Comments;
            }
            set
            {
                OnCommentsChanging(value);
                ReportPropertyChanging("Comments");
                _Comments = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Comments");
                OnCommentsChanged();
            }
        }
        private global::System.String _Comments;
        partial void OnCommentsChanging(global::System.String value);
        partial void OnCommentsChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.DateTime CreateTime
        {
            get
            {
                return _CreateTime;
            }
            set
            {
                OnCreateTimeChanging(value);
                ReportPropertyChanging("CreateTime");
                _CreateTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreateTime");
                OnCreateTimeChanged();
            }
        }
        private global::System.DateTime _CreateTime;
        partial void OnCreateTimeChanging(global::System.DateTime value);
        partial void OnCreateTimeChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Request_RequestLog_FK1", "Request")]
        public Request Request
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_RequestLog_FK1", "Request").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_RequestLog_FK1", "Request").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Request> RequestReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_RequestLog_FK1", "Request");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Request>("RDWModel.Request_RequestLog_FK1", "Request", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "Role")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class Role : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new Role object.
        /// </summary>
        /// <param name="roleId">Initial value of the RoleId property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        public static Role CreateRole(global::System.Int32 roleId, global::System.String name)
        {
            Role role = new Role();
            role.RoleId = roleId;
            role.Name = name;
            return role;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 RoleId
        {
            get
            {
                return _RoleId;
            }
            set
            {
                if (_RoleId != value)
                {
                    OnRoleIdChanging(value);
                    ReportPropertyChanging("RoleId");
                    _RoleId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("RoleId");
                    OnRoleIdChanged();
                }
            }
        }
        private global::System.Int32 _RoleId;
        partial void OnRoleIdChanging(global::System.Int32 value);
        partial void OnRoleIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Desc
        {
            get
            {
                return _Desc;
            }
            set
            {
                OnDescChanging(value);
                ReportPropertyChanging("Desc");
                _Desc = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Desc");
                OnDescChanged();
            }
        }
        private global::System.String _Desc;
        partial void OnDescChanging(global::System.String value);
        partial void OnDescChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Role_LabManager_FK1", "LabManager")]
        public EntityCollection<LabManager> LabManager
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<LabManager>("RDWModel.Role_LabManager_FK1", "LabManager");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<LabManager>("RDWModel.Role_LabManager_FK1", "LabManager", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Role_SiteManager_FK1", "SiteManager")]
        public EntityCollection<SiteManager> SiteManager
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SiteManager>("RDWModel.Role_SiteManager_FK1", "SiteManager");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SiteManager>("RDWModel.Role_SiteManager_FK1", "SiteManager", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Role_UserRole_FK1", "UserRole")]
        public EntityCollection<UserRole> UserRole
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<UserRole>("RDWModel.Role_UserRole_FK1", "UserRole");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<UserRole>("RDWModel.Role_UserRole_FK1", "UserRole", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "SiteManager")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class SiteManager : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new SiteManager object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        public static SiteManager CreateSiteManager(global::System.Int32 id)
        {
            SiteManager siteManager = new SiteManager();
            siteManager.Id = id;
            return siteManager;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> LocationId
        {
            get
            {
                return _LocationId;
            }
            set
            {
                OnLocationIdChanging(value);
                ReportPropertyChanging("LocationId");
                _LocationId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LocationId");
                OnLocationIdChanged();
            }
        }
        private Nullable<global::System.Int32> _LocationId;
        partial void OnLocationIdChanging(Nullable<global::System.Int32> value);
        partial void OnLocationIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> RoleId
        {
            get
            {
                return _RoleId;
            }
            set
            {
                OnRoleIdChanging(value);
                ReportPropertyChanging("RoleId");
                _RoleId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RoleId");
                OnRoleIdChanged();
            }
        }
        private Nullable<global::System.Int32> _RoleId;
        partial void OnRoleIdChanging(Nullable<global::System.Int32> value);
        partial void OnRoleIdChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Location_SiteManager_FK1", "Location")]
        public Location Location
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Location>("RDWModel.Location_SiteManager_FK1", "Location").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Location>("RDWModel.Location_SiteManager_FK1", "Location").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Location> LocationReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Location>("RDWModel.Location_SiteManager_FK1", "Location");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Location>("RDWModel.Location_SiteManager_FK1", "Location", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Role_SiteManager_FK1", "Role")]
        public Role Role
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("RDWModel.Role_SiteManager_FK1", "Role").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("RDWModel.Role_SiteManager_FK1", "Role").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Role> RoleReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("RDWModel.Role_SiteManager_FK1", "Role");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Role>("RDWModel.Role_SiteManager_FK1", "Role", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "SysLog")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class SysLog : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new SysLog object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="desc">Initial value of the Desc property.</param>
        /// <param name="createTime">Initial value of the CreateTime property.</param>
        /// <param name="createBy">Initial value of the CreateBy property.</param>
        public static SysLog CreateSysLog(global::System.Int32 id, global::System.String desc, global::System.DateTime createTime, global::System.Int32 createBy)
        {
            SysLog sysLog = new SysLog();
            sysLog.Id = id;
            sysLog.Desc = desc;
            sysLog.CreateTime = createTime;
            sysLog.CreateBy = createBy;
            return sysLog;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Desc
        {
            get
            {
                return _Desc;
            }
            set
            {
                OnDescChanging(value);
                ReportPropertyChanging("Desc");
                _Desc = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Desc");
                OnDescChanged();
            }
        }
        private global::System.String _Desc;
        partial void OnDescChanging(global::System.String value);
        partial void OnDescChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.DateTime CreateTime
        {
            get
            {
                return _CreateTime;
            }
            set
            {
                OnCreateTimeChanging(value);
                ReportPropertyChanging("CreateTime");
                _CreateTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreateTime");
                OnCreateTimeChanged();
            }
        }
        private global::System.DateTime _CreateTime;
        partial void OnCreateTimeChanging(global::System.DateTime value);
        partial void OnCreateTimeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 CreateBy
        {
            get
            {
                return _CreateBy;
            }
            set
            {
                OnCreateByChanging(value);
                ReportPropertyChanging("CreateBy");
                _CreateBy = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreateBy");
                OnCreateByChanged();
            }
        }
        private global::System.Int32 _CreateBy;
        partial void OnCreateByChanging(global::System.Int32 value);
        partial void OnCreateByChanged();

        #endregion

    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "SysSetting")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class SysSetting : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new SysSetting object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="key">Initial value of the Key property.</param>
        /// <param name="value">Initial value of the Value property.</param>
        public static SysSetting CreateSysSetting(global::System.Int32 id, global::System.String key, global::System.String value)
        {
            SysSetting sysSetting = new SysSetting();
            sysSetting.Id = id;
            sysSetting.Key = key;
            sysSetting.Value = value;
            return sysSetting;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Key
        {
            get
            {
                return _Key;
            }
            set
            {
                OnKeyChanging(value);
                ReportPropertyChanging("Key");
                _Key = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Key");
                OnKeyChanged();
            }
        }
        private global::System.String _Key;
        partial void OnKeyChanging(global::System.String value);
        partial void OnKeyChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Value
        {
            get
            {
                return _Value;
            }
            set
            {
                OnValueChanging(value);
                ReportPropertyChanging("Value");
                _Value = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Value");
                OnValueChanged();
            }
        }
        private global::System.String _Value;
        partial void OnValueChanging(global::System.String value);
        partial void OnValueChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Comments
        {
            get
            {
                return _Comments;
            }
            set
            {
                OnCommentsChanging(value);
                ReportPropertyChanging("Comments");
                _Comments = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Comments");
                OnCommentsChanged();
            }
        }
        private global::System.String _Comments;
        partial void OnCommentsChanging(global::System.String value);
        partial void OnCommentsChanged();

        #endregion

    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "TestPerson")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class TestPerson : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new TestPerson object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="testRequestId">Initial value of the TestRequestId property.</param>
        public static TestPerson CreateTestPerson(global::System.Int32 id, global::System.Int32 testRequestId)
        {
            TestPerson testPerson = new TestPerson();
            testPerson.Id = id;
            testPerson.TestRequestId = testRequestId;
            return testPerson;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 TestRequestId
        {
            get
            {
                return _TestRequestId;
            }
            set
            {
                OnTestRequestIdChanging(value);
                ReportPropertyChanging("TestRequestId");
                _TestRequestId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("TestRequestId");
                OnTestRequestIdChanged();
            }
        }
        private global::System.Int32 _TestRequestId;
        partial void OnTestRequestIdChanging(global::System.Int32 value);
        partial void OnTestRequestIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Dep
        {
            get
            {
                return _Dep;
            }
            set
            {
                OnDepChanging(value);
                ReportPropertyChanging("Dep");
                _Dep = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Dep");
                OnDepChanged();
            }
        }
        private global::System.String _Dep;
        partial void OnDepChanging(global::System.String value);
        partial void OnDepChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Mobile
        {
            get
            {
                return _Mobile;
            }
            set
            {
                OnMobileChanging(value);
                ReportPropertyChanging("Mobile");
                _Mobile = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Mobile");
                OnMobileChanged();
            }
        }
        private global::System.String _Mobile;
        partial void OnMobileChanging(global::System.String value);
        partial void OnMobileChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Telephone
        {
            get
            {
                return _Telephone;
            }
            set
            {
                OnTelephoneChanging(value);
                ReportPropertyChanging("Telephone");
                _Telephone = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Telephone");
                OnTelephoneChanged();
            }
        }
        private global::System.String _Telephone;
        partial void OnTelephoneChanging(global::System.String value);
        partial void OnTelephoneChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Email
        {
            get
            {
                return _Email;
            }
            set
            {
                OnEmailChanging(value);
                ReportPropertyChanging("Email");
                _Email = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Email");
                OnEmailChanged();
            }
        }
        private global::System.String _Email;
        partial void OnEmailChanging(global::System.String value);
        partial void OnEmailChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "TestRequest_TestPerson_FK1", "TestRequest")]
        public TestRequest TestRequest
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<TestRequest>("RDWModel.TestRequest_TestPerson_FK1", "TestRequest").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<TestRequest>("RDWModel.TestRequest_TestPerson_FK1", "TestRequest").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<TestRequest> TestRequestReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<TestRequest>("RDWModel.TestRequest_TestPerson_FK1", "TestRequest");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<TestRequest>("RDWModel.TestRequest_TestPerson_FK1", "TestRequest", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "TestRequest")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class TestRequest : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new TestRequest object.
        /// </summary>
        /// <param name="testRequestId">Initial value of the TestRequestId property.</param>
        /// <param name="requestId">Initial value of the RequestId property.</param>
        /// <param name="content">Initial value of the Content property.</param>
        /// <param name="personNum">Initial value of the PersonNum property.</param>
        public static TestRequest CreateTestRequest(global::System.Int32 testRequestId, global::System.Int32 requestId, global::System.String content, global::System.Int32 personNum)
        {
            TestRequest testRequest = new TestRequest();
            testRequest.TestRequestId = testRequestId;
            testRequest.RequestId = requestId;
            testRequest.Content = content;
            testRequest.PersonNum = personNum;
            return testRequest;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 TestRequestId
        {
            get
            {
                return _TestRequestId;
            }
            set
            {
                if (_TestRequestId != value)
                {
                    OnTestRequestIdChanging(value);
                    ReportPropertyChanging("TestRequestId");
                    _TestRequestId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("TestRequestId");
                    OnTestRequestIdChanged();
                }
            }
        }
        private global::System.Int32 _TestRequestId;
        partial void OnTestRequestIdChanging(global::System.Int32 value);
        partial void OnTestRequestIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 RequestId
        {
            get
            {
                return _RequestId;
            }
            set
            {
                OnRequestIdChanging(value);
                ReportPropertyChanging("RequestId");
                _RequestId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RequestId");
                OnRequestIdChanged();
            }
        }
        private global::System.Int32 _RequestId;
        partial void OnRequestIdChanging(global::System.Int32 value);
        partial void OnRequestIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Content
        {
            get
            {
                return _Content;
            }
            set
            {
                OnContentChanging(value);
                ReportPropertyChanging("Content");
                _Content = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Content");
                OnContentChanged();
            }
        }
        private global::System.String _Content;
        partial void OnContentChanging(global::System.String value);
        partial void OnContentChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 PersonNum
        {
            get
            {
                return _PersonNum;
            }
            set
            {
                OnPersonNumChanging(value);
                ReportPropertyChanging("PersonNum");
                _PersonNum = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("PersonNum");
                OnPersonNumChanged();
            }
        }
        private global::System.Int32 _PersonNum;
        partial void OnPersonNumChanging(global::System.Int32 value);
        partial void OnPersonNumChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String OtherRequirements
        {
            get
            {
                return _OtherRequirements;
            }
            set
            {
                OnOtherRequirementsChanging(value);
                ReportPropertyChanging("OtherRequirements");
                _OtherRequirements = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("OtherRequirements");
                OnOtherRequirementsChanged();
            }
        }
        private global::System.String _OtherRequirements;
        partial void OnOtherRequirementsChanging(global::System.String value);
        partial void OnOtherRequirementsChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Request_TestRequest_FK1", "Request")]
        public Request Request
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_TestRequest_FK1", "Request").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_TestRequest_FK1", "Request").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Request> RequestReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_TestRequest_FK1", "Request");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Request>("RDWModel.Request_TestRequest_FK1", "Request", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "TestRequest_TestPerson_FK1", "TestPerson")]
        public EntityCollection<TestPerson> TestPerson
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<TestPerson>("RDWModel.TestRequest_TestPerson_FK1", "TestPerson");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<TestPerson>("RDWModel.TestRequest_TestPerson_FK1", "TestPerson", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "User")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class User : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new User object.
        /// </summary>
        /// <param name="userId">Initial value of the UserId property.</param>
        /// <param name="account">Initial value of the Account property.</param>
        /// <param name="syncTime">Initial value of the SyncTime property.</param>
        public static User CreateUser(global::System.Int32 userId, global::System.String account, global::System.DateTime syncTime)
        {
            User user = new User();
            user.UserId = userId;
            user.Account = account;
            user.SyncTime = syncTime;
            return user;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 UserId
        {
            get
            {
                return _UserId;
            }
            set
            {
                if (_UserId != value)
                {
                    OnUserIdChanging(value);
                    ReportPropertyChanging("UserId");
                    _UserId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("UserId");
                    OnUserIdChanged();
                }
            }
        }
        private global::System.Int32 _UserId;
        partial void OnUserIdChanging(global::System.Int32 value);
        partial void OnUserIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Account
        {
            get
            {
                return _Account;
            }
            set
            {
                OnAccountChanging(value);
                ReportPropertyChanging("Account");
                _Account = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Account");
                OnAccountChanged();
            }
        }
        private global::System.String _Account;
        partial void OnAccountChanging(global::System.String value);
        partial void OnAccountChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> DepId
        {
            get
            {
                return _DepId;
            }
            set
            {
                OnDepIdChanging(value);
                ReportPropertyChanging("DepId");
                _DepId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DepId");
                OnDepIdChanged();
            }
        }
        private Nullable<global::System.Int32> _DepId;
        partial void OnDepIdChanging(Nullable<global::System.Int32> value);
        partial void OnDepIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String EmployeeNo
        {
            get
            {
                return _EmployeeNo;
            }
            set
            {
                OnEmployeeNoChanging(value);
                ReportPropertyChanging("EmployeeNo");
                _EmployeeNo = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("EmployeeNo");
                OnEmployeeNoChanged();
            }
        }
        private global::System.String _EmployeeNo;
        partial void OnEmployeeNoChanging(global::System.String value);
        partial void OnEmployeeNoChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String NameEN
        {
            get
            {
                return _NameEN;
            }
            set
            {
                OnNameENChanging(value);
                ReportPropertyChanging("NameEN");
                _NameEN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("NameEN");
                OnNameENChanged();
            }
        }
        private global::System.String _NameEN;
        partial void OnNameENChanging(global::System.String value);
        partial void OnNameENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String NameCN
        {
            get
            {
                return _NameCN;
            }
            set
            {
                OnNameCNChanging(value);
                ReportPropertyChanging("NameCN");
                _NameCN = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("NameCN");
                OnNameCNChanged();
            }
        }
        private global::System.String _NameCN;
        partial void OnNameCNChanging(global::System.String value);
        partial void OnNameCNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String NameChinese
        {
            get
            {
                return _NameChinese;
            }
            set
            {
                OnNameChineseChanging(value);
                ReportPropertyChanging("NameChinese");
                _NameChinese = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("NameChinese");
                OnNameChineseChanged();
            }
        }
        private global::System.String _NameChinese;
        partial void OnNameChineseChanging(global::System.String value);
        partial void OnNameChineseChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Title
        {
            get
            {
                return _Title;
            }
            set
            {
                OnTitleChanging(value);
                ReportPropertyChanging("Title");
                _Title = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Title");
                OnTitleChanged();
            }
        }
        private global::System.String _Title;
        partial void OnTitleChanging(global::System.String value);
        partial void OnTitleChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String OfficePhone
        {
            get
            {
                return _OfficePhone;
            }
            set
            {
                OnOfficePhoneChanging(value);
                ReportPropertyChanging("OfficePhone");
                _OfficePhone = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("OfficePhone");
                OnOfficePhoneChanged();
            }
        }
        private global::System.String _OfficePhone;
        partial void OnOfficePhoneChanging(global::System.String value);
        partial void OnOfficePhoneChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Mobile
        {
            get
            {
                return _Mobile;
            }
            set
            {
                OnMobileChanging(value);
                ReportPropertyChanging("Mobile");
                _Mobile = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Mobile");
                OnMobileChanged();
            }
        }
        private global::System.String _Mobile;
        partial void OnMobileChanging(global::System.String value);
        partial void OnMobileChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Email
        {
            get
            {
                return _Email;
            }
            set
            {
                OnEmailChanging(value);
                ReportPropertyChanging("Email");
                _Email = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Email");
                OnEmailChanged();
            }
        }
        private global::System.String _Email;
        partial void OnEmailChanging(global::System.String value);
        partial void OnEmailChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String ReportTo
        {
            get
            {
                return _ReportTo;
            }
            set
            {
                OnReportToChanging(value);
                ReportPropertyChanging("ReportTo");
                _ReportTo = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ReportTo");
                OnReportToChanged();
            }
        }
        private global::System.String _ReportTo;
        partial void OnReportToChanging(global::System.String value);
        partial void OnReportToChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String BG
        {
            get
            {
                return _BG;
            }
            set
            {
                OnBGChanging(value);
                ReportPropertyChanging("BG");
                _BG = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("BG");
                OnBGChanged();
            }
        }
        private global::System.String _BG;
        partial void OnBGChanging(global::System.String value);
        partial void OnBGChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String BD
        {
            get
            {
                return _BD;
            }
            set
            {
                OnBDChanging(value);
                ReportPropertyChanging("BD");
                _BD = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("BD");
                OnBDChanged();
            }
        }
        private global::System.String _BD;
        partial void OnBDChanging(global::System.String value);
        partial void OnBDChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Boolean> IsActive
        {
            get
            {
                return _IsActive;
            }
            set
            {
                OnIsActiveChanging(value);
                ReportPropertyChanging("IsActive");
                _IsActive = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsActive");
                OnIsActiveChanged();
            }
        }
        private Nullable<global::System.Boolean> _IsActive;
        partial void OnIsActiveChanging(Nullable<global::System.Boolean> value);
        partial void OnIsActiveChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.DateTime SyncTime
        {
            get
            {
                return _SyncTime;
            }
            set
            {
                OnSyncTimeChanging(value);
                ReportPropertyChanging("SyncTime");
                _SyncTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SyncTime");
                OnSyncTimeChanged();
            }
        }
        private global::System.DateTime _SyncTime;
        partial void OnSyncTimeChanging(global::System.DateTime value);
        partial void OnSyncTimeChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Department_User_FK1", "Department")]
        public Department Department
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Department>("RDWModel.Department_User_FK1", "Department").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Department>("RDWModel.Department_User_FK1", "Department").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Department> DepartmentReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Department>("RDWModel.Department_User_FK1", "Department");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Department>("RDWModel.Department_User_FK1", "Department", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "User_UserRole_FK1", "UserRole")]
        public EntityCollection<UserRole> UserRole
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<UserRole>("RDWModel.User_UserRole_FK1", "UserRole");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<UserRole>("RDWModel.User_UserRole_FK1", "UserRole", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "UserRole")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class UserRole : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new UserRole object.
        /// </summary>
        /// <param name="userRoleId">Initial value of the UserRoleId property.</param>
        /// <param name="userId">Initial value of the UserId property.</param>
        /// <param name="roleId">Initial value of the RoleId property.</param>
        public static UserRole CreateUserRole(global::System.Int32 userRoleId, global::System.Int32 userId, global::System.Int32 roleId)
        {
            UserRole userRole = new UserRole();
            userRole.UserRoleId = userRoleId;
            userRole.UserId = userId;
            userRole.RoleId = roleId;
            return userRole;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 UserRoleId
        {
            get
            {
                return _UserRoleId;
            }
            set
            {
                if (_UserRoleId != value)
                {
                    OnUserRoleIdChanging(value);
                    ReportPropertyChanging("UserRoleId");
                    _UserRoleId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("UserRoleId");
                    OnUserRoleIdChanged();
                }
            }
        }
        private global::System.Int32 _UserRoleId;
        partial void OnUserRoleIdChanging(global::System.Int32 value);
        partial void OnUserRoleIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 UserId
        {
            get
            {
                return _UserId;
            }
            set
            {
                OnUserIdChanging(value);
                ReportPropertyChanging("UserId");
                _UserId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("UserId");
                OnUserIdChanged();
            }
        }
        private global::System.Int32 _UserId;
        partial void OnUserIdChanging(global::System.Int32 value);
        partial void OnUserIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 RoleId
        {
            get
            {
                return _RoleId;
            }
            set
            {
                OnRoleIdChanging(value);
                ReportPropertyChanging("RoleId");
                _RoleId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RoleId");
                OnRoleIdChanged();
            }
        }
        private global::System.Int32 _RoleId;
        partial void OnRoleIdChanging(global::System.Int32 value);
        partial void OnRoleIdChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Role_UserRole_FK1", "Role")]
        public Role Role
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("RDWModel.Role_UserRole_FK1", "Role").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("RDWModel.Role_UserRole_FK1", "Role").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Role> RoleReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("RDWModel.Role_UserRole_FK1", "Role");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Role>("RDWModel.Role_UserRole_FK1", "Role", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "User_UserRole_FK1", "User")]
        public User User
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("RDWModel.User_UserRole_FK1", "User").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("RDWModel.User_UserRole_FK1", "User").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<User> UserReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("RDWModel.User_UserRole_FK1", "User");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<User>("RDWModel.User_UserRole_FK1", "User", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "VisitProduct")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class VisitProduct : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new VisitProduct object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        public static VisitProduct CreateVisitProduct(global::System.Int32 id)
        {
            VisitProduct visitProduct = new VisitProduct();
            visitProduct.Id = id;
            return visitProduct;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> VisitRequestId
        {
            get
            {
                return _VisitRequestId;
            }
            set
            {
                OnVisitRequestIdChanging(value);
                ReportPropertyChanging("VisitRequestId");
                _VisitRequestId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("VisitRequestId");
                OnVisitRequestIdChanged();
            }
        }
        private Nullable<global::System.Int32> _VisitRequestId;
        partial void OnVisitRequestIdChanging(Nullable<global::System.Int32> value);
        partial void OnVisitRequestIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> ProductId
        {
            get
            {
                return _ProductId;
            }
            set
            {
                OnProductIdChanging(value);
                ReportPropertyChanging("ProductId");
                _ProductId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ProductId");
                OnProductIdChanged();
            }
        }
        private Nullable<global::System.Int32> _ProductId;
        partial void OnProductIdChanging(Nullable<global::System.Int32> value);
        partial void OnProductIdChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Product_VisitProduct_FK1", "Product")]
        public Product Product
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Product>("RDWModel.Product_VisitProduct_FK1", "Product").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Product>("RDWModel.Product_VisitProduct_FK1", "Product").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Product> ProductReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Product>("RDWModel.Product_VisitProduct_FK1", "Product");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Product>("RDWModel.Product_VisitProduct_FK1", "Product", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "VisitRequest_VisitProduct_FK1", "VisitRequest")]
        public VisitRequest VisitRequest
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<VisitRequest>("RDWModel.VisitRequest_VisitProduct_FK1", "VisitRequest").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<VisitRequest>("RDWModel.VisitRequest_VisitProduct_FK1", "VisitRequest").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<VisitRequest> VisitRequestReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<VisitRequest>("RDWModel.VisitRequest_VisitProduct_FK1", "VisitRequest");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<VisitRequest>("RDWModel.VisitRequest_VisitProduct_FK1", "VisitRequest", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "VisitRequest")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class VisitRequest : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new VisitRequest object.
        /// </summary>
        /// <param name="visitRequestId">Initial value of the VisitRequestId property.</param>
        /// <param name="requestId">Initial value of the RequestId property.</param>
        /// <param name="isFirstTime">Initial value of the IsFirstTime property.</param>
        public static VisitRequest CreateVisitRequest(global::System.Int32 visitRequestId, global::System.Int32 requestId, global::System.Boolean isFirstTime)
        {
            VisitRequest visitRequest = new VisitRequest();
            visitRequest.VisitRequestId = visitRequestId;
            visitRequest.RequestId = requestId;
            visitRequest.IsFirstTime = isFirstTime;
            return visitRequest;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 VisitRequestId
        {
            get
            {
                return _VisitRequestId;
            }
            set
            {
                if (_VisitRequestId != value)
                {
                    OnVisitRequestIdChanging(value);
                    ReportPropertyChanging("VisitRequestId");
                    _VisitRequestId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("VisitRequestId");
                    OnVisitRequestIdChanged();
                }
            }
        }
        private global::System.Int32 _VisitRequestId;
        partial void OnVisitRequestIdChanging(global::System.Int32 value);
        partial void OnVisitRequestIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 RequestId
        {
            get
            {
                return _RequestId;
            }
            set
            {
                OnRequestIdChanging(value);
                ReportPropertyChanging("RequestId");
                _RequestId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RequestId");
                OnRequestIdChanged();
            }
        }
        private global::System.Int32 _RequestId;
        partial void OnRequestIdChanging(global::System.Int32 value);
        partial void OnRequestIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String CompanyName
        {
            get
            {
                return _CompanyName;
            }
            set
            {
                OnCompanyNameChanging(value);
                ReportPropertyChanging("CompanyName");
                _CompanyName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("CompanyName");
                OnCompanyNameChanged();
            }
        }
        private global::System.String _CompanyName;
        partial void OnCompanyNameChanging(global::System.String value);
        partial void OnCompanyNameChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> PersonNum
        {
            get
            {
                return _PersonNum;
            }
            set
            {
                OnPersonNumChanging(value);
                ReportPropertyChanging("PersonNum");
                _PersonNum = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("PersonNum");
                OnPersonNumChanged();
            }
        }
        private Nullable<global::System.Int32> _PersonNum;
        partial void OnPersonNumChanging(Nullable<global::System.Int32> value);
        partial void OnPersonNumChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> VisitType1
        {
            get
            {
                return _VisitType1;
            }
            set
            {
                OnVisitType1Changing(value);
                ReportPropertyChanging("VisitType1");
                _VisitType1 = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("VisitType1");
                OnVisitType1Changed();
            }
        }
        private Nullable<global::System.Int32> _VisitType1;
        partial void OnVisitType1Changing(Nullable<global::System.Int32> value);
        partial void OnVisitType1Changed();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> VisitType2
        {
            get
            {
                return _VisitType2;
            }
            set
            {
                OnVisitType2Changing(value);
                ReportPropertyChanging("VisitType2");
                _VisitType2 = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("VisitType2");
                OnVisitType2Changed();
            }
        }
        private Nullable<global::System.Int32> _VisitType2;
        partial void OnVisitType2Changing(Nullable<global::System.Int32> value);
        partial void OnVisitType2Changed();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String MainPersonName
        {
            get
            {
                return _MainPersonName;
            }
            set
            {
                OnMainPersonNameChanging(value);
                ReportPropertyChanging("MainPersonName");
                _MainPersonName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("MainPersonName");
                OnMainPersonNameChanged();
            }
        }
        private global::System.String _MainPersonName;
        partial void OnMainPersonNameChanging(global::System.String value);
        partial void OnMainPersonNameChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String MainPersonTitle
        {
            get
            {
                return _MainPersonTitle;
            }
            set
            {
                OnMainPersonTitleChanging(value);
                ReportPropertyChanging("MainPersonTitle");
                _MainPersonTitle = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("MainPersonTitle");
                OnMainPersonTitleChanged();
            }
        }
        private global::System.String _MainPersonTitle;
        partial void OnMainPersonTitleChanging(global::System.String value);
        partial void OnMainPersonTitleChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Person2Name
        {
            get
            {
                return _Person2Name;
            }
            set
            {
                OnPerson2NameChanging(value);
                ReportPropertyChanging("Person2Name");
                _Person2Name = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Person2Name");
                OnPerson2NameChanged();
            }
        }
        private global::System.String _Person2Name;
        partial void OnPerson2NameChanging(global::System.String value);
        partial void OnPerson2NameChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Person2Title
        {
            get
            {
                return _Person2Title;
            }
            set
            {
                OnPerson2TitleChanging(value);
                ReportPropertyChanging("Person2Title");
                _Person2Title = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Person2Title");
                OnPerson2TitleChanged();
            }
        }
        private global::System.String _Person2Title;
        partial void OnPerson2TitleChanging(global::System.String value);
        partial void OnPerson2TitleChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Person3Name
        {
            get
            {
                return _Person3Name;
            }
            set
            {
                OnPerson3NameChanging(value);
                ReportPropertyChanging("Person3Name");
                _Person3Name = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Person3Name");
                OnPerson3NameChanged();
            }
        }
        private global::System.String _Person3Name;
        partial void OnPerson3NameChanging(global::System.String value);
        partial void OnPerson3NameChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Person3Title
        {
            get
            {
                return _Person3Title;
            }
            set
            {
                OnPerson3TitleChanging(value);
                ReportPropertyChanging("Person3Title");
                _Person3Title = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Person3Title");
                OnPerson3TitleChanged();
            }
        }
        private global::System.String _Person3Title;
        partial void OnPerson3TitleChanging(global::System.String value);
        partial void OnPerson3TitleChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Boolean IsFirstTime
        {
            get
            {
                return _IsFirstTime;
            }
            set
            {
                OnIsFirstTimeChanging(value);
                ReportPropertyChanging("IsFirstTime");
                _IsFirstTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsFirstTime");
                OnIsFirstTimeChanged();
            }
        }
        private global::System.Boolean _IsFirstTime;
        partial void OnIsFirstTimeChanging(global::System.Boolean value);
        partial void OnIsFirstTimeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> LastDate
        {
            get
            {
                return _LastDate;
            }
            set
            {
                OnLastDateChanging(value);
                ReportPropertyChanging("LastDate");
                _LastDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LastDate");
                OnLastDateChanged();
            }
        }
        private Nullable<global::System.DateTime> _LastDate;
        partial void OnLastDateChanging(Nullable<global::System.DateTime> value);
        partial void OnLastDateChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String Purpose
        {
            get
            {
                return _Purpose;
            }
            set
            {
                OnPurposeChanging(value);
                ReportPropertyChanging("Purpose");
                _Purpose = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Purpose");
                OnPurposeChanged();
            }
        }
        private global::System.String _Purpose;
        partial void OnPurposeChanging(global::System.String value);
        partial void OnPurposeChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String KeyContent
        {
            get
            {
                return _KeyContent;
            }
            set
            {
                OnKeyContentChanging(value);
                ReportPropertyChanging("KeyContent");
                _KeyContent = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("KeyContent");
                OnKeyContentChanged();
            }
        }
        private global::System.String _KeyContent;
        partial void OnKeyContentChanging(global::System.String value);
        partial void OnKeyContentChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String OtherRequirements
        {
            get
            {
                return _OtherRequirements;
            }
            set
            {
                OnOtherRequirementsChanging(value);
                ReportPropertyChanging("OtherRequirements");
                _OtherRequirements = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("OtherRequirements");
                OnOtherRequirementsChanged();
            }
        }
        private global::System.String _OtherRequirements;
        partial void OnOtherRequirementsChanging(global::System.String value);
        partial void OnOtherRequirementsChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> Accompany
        {
            get
            {
                return _Accompany;
            }
            set
            {
                OnAccompanyChanging(value);
                ReportPropertyChanging("Accompany");
                _Accompany = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Accompany");
                OnAccompanyChanged();
            }
        }
        private Nullable<global::System.Int32> _Accompany;
        partial void OnAccompanyChanging(Nullable<global::System.Int32> value);
        partial void OnAccompanyChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String AccompanyManager
        {
            get
            {
                return _AccompanyManager;
            }
            set
            {
                OnAccompanyManagerChanging(value);
                ReportPropertyChanging("AccompanyManager");
                _AccompanyManager = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("AccompanyManager");
                OnAccompanyManagerChanged();
            }
        }
        private global::System.String _AccompanyManager;
        partial void OnAccompanyManagerChanging(global::System.String value);
        partial void OnAccompanyManagerChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = true)]
        [DataMemberAttribute()]
        public global::System.String AccompanyManagerTitle
        {
            get
            {
                return _AccompanyManagerTitle;
            }
            set
            {
                OnAccompanyManagerTitleChanging(value);
                ReportPropertyChanging("AccompanyManagerTitle");
                _AccompanyManagerTitle = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("AccompanyManagerTitle");
                OnAccompanyManagerTitleChanged();
            }
        }
        private global::System.String _AccompanyManagerTitle;
        partial void OnAccompanyManagerTitleChanging(global::System.String value);
        partial void OnAccompanyManagerTitleChanged();

        #endregion

        #region Navigation Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "Request_VisitRequest_FK1", "Request")]
        public Request Request
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_VisitRequest_FK1", "Request").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_VisitRequest_FK1", "Request").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Request> RequestReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Request>("RDWModel.Request_VisitRequest_FK1", "Request");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Request>("RDWModel.Request_VisitRequest_FK1", "Request", value);
                }
            }
        }

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("RDWModel", "VisitRequest_VisitProduct_FK1", "VisitProduct")]
        public EntityCollection<VisitProduct> VisitProduct
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<VisitProduct>("RDWModel.VisitRequest_VisitProduct_FK1", "VisitProduct");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<VisitProduct>("RDWModel.VisitRequest_VisitProduct_FK1", "VisitProduct", value);
                }
            }
        }

        #endregion
    }

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName = "RDWModel", Name = "VisitType")]
    [Serializable()]
    [DataContractAttribute(IsReference = true)]
    public partial class VisitType : EntityObject
    {
        #region Factory Method

        /// <summary>
        /// Create a new VisitType object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="name_CN">Initial value of the Name_CN property.</param>
        /// <param name="name_EN">Initial value of the Name_EN property.</param>
        /// <param name="parentId">Initial value of the ParentId property.</param>
        /// <param name="level">Initial value of the Level property.</param>
        public static VisitType CreateVisitType(global::System.Int32 id, global::System.String name_CN, global::System.String name_EN, global::System.Int32 parentId, global::System.Int32 level)
        {
            VisitType visitType = new VisitType();
            visitType.Id = id;
            visitType.Name_CN = name_CN;
            visitType.Name_EN = name_EN;
            visitType.ParentId = parentId;
            visitType.Level = level;
            return visitType;
        }

        #endregion
        #region Primitive Properties

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = true, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Name_CN
        {
            get
            {
                return _Name_CN;
            }
            set
            {
                OnName_CNChanging(value);
                ReportPropertyChanging("Name_CN");
                _Name_CN = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name_CN");
                OnName_CNChanged();
            }
        }
        private global::System.String _Name_CN;
        partial void OnName_CNChanging(global::System.String value);
        partial void OnName_CNChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.String Name_EN
        {
            get
            {
                return _Name_EN;
            }
            set
            {
                OnName_ENChanging(value);
                ReportPropertyChanging("Name_EN");
                _Name_EN = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name_EN");
                OnName_ENChanged();
            }
        }
        private global::System.String _Name_EN;
        partial void OnName_ENChanging(global::System.String value);
        partial void OnName_ENChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 ParentId
        {
            get
            {
                return _ParentId;
            }
            set
            {
                OnParentIdChanging(value);
                ReportPropertyChanging("ParentId");
                _ParentId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ParentId");
                OnParentIdChanged();
            }
        }
        private global::System.Int32 _ParentId;
        partial void OnParentIdChanging(global::System.Int32 value);
        partial void OnParentIdChanged();

        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty = false, IsNullable = false)]
        [DataMemberAttribute()]
        public global::System.Int32 Level
        {
            get
            {
                return _Level;
            }
            set
            {
                OnLevelChanging(value);
                ReportPropertyChanging("Level");
                _Level = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Level");
                OnLevelChanged();
            }
        }
        private global::System.Int32 _Level;
        partial void OnLevelChanging(global::System.Int32 value);
        partial void OnLevelChanged();

        #endregion

    }

    #endregion
}
